;(function(global) {
  global.tabbar = {
    template: `
              <div class="flex-wrap flex-justify-around flex-center-wrap tabbar-container">
                <div class="tabbar-icon-container"  @click="goToTopic">
                    <img v-if="arr[0] === 1" class="tabbar-icon" src="../../common/image/selectetopic.png" alt="">
                    <img v-else class="tabbar-icon" src="../../common/image/noselectetopic.png" alt="">
                    <div class="tabbar-common" :class="{'tabbar-tabbar-color':arr[0] === 1}">题库</div>
                </div>
                <div class="tabbar-icon-container"  @click="goToexcellentCourse">
                    <img v-if="arr[1] === 1" class="tabbar-icon" src="../../common/image/selectecourse.png" alt="">
                    <img v-else class="tabbar-icon" src="../../common/image/noselectecourse.png" alt="">
                    <div class="tabbar-common" :class="{'tabbar-tabbar-color':arr[1] === 1}">课程</div>
                </div>
                <div class="tabbar-icon-container"  @click="goToPersonCenter">
                    <img v-if="arr[2] === 1" class="tabbar-icon" src="../../common/image/selectmy.png" alt="">
                    <img v-else class="tabbar-icon" src="../../common/image/noselectmy.png" alt="">
                    <div class="tabbar-common" :class="{'tabbar-tabbar-color':arr[2] === 1}">我的</div>
                </div>
              </div>
          `,
    props: ['arr'],
    data() {
      return {}
    },
    computed: {},
    methods: {
      // 底部 题库跳转
      goToTopic() {
        if (this.arr[0] === 1) {
          return
        }
        window.location.href = '../examCenter/topic.html'
      },
      //  课程跳转
      goToexcellentCourse() {
        if (this.arr[1] === 1) {
          return
        }
        window.location.href = '../courseCenter/excellentCourses.html'
      },
      // 我的中心跳转
      goToPersonCenter() {
        if (this.arr[2] === 1) {
          return
        }
        window.location.href = '../personCenter/personCenter.html'
      }
    },
    created() {},
    mounted() {}
  }
})(window)
